﻿<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<umbPackage>

  <info>
    <package>
      <name>UComment</name>
      <version>1.0</version>
      <license url="http://www.opensource.org/licenses/mit-license.php">MIT license</license>
      <url>http://www.umbraco.org</url>
      <requirements>
        <major>4</major>
        <minor>0</minor>
        <patch>0</patch>
      </requirements>
    </package>
    <author>
      <name>Tim Geyssens, Niels Hartvig, Per Ploug Hansen</name>
      <website>http://www.umbraco.org</website>
    </author>
    <readme>
      <![CDATA[Standalone comment component (seperated from blog4umbraco) for umbraco.]]>
    </readme>
  </info>

  <Documents/>
  <DocumentTypes/>
  <Templates />
  <Stylesheets />

  <Macros>
    <macro>
      <name>UComment List Comments</name>
      <alias>UCommentListComments</alias>
      <scriptType>
      </scriptType>
      <scriptAssembly>
      </scriptAssembly>
      <xslt>UCommentListComments.xslt</xslt>
      <useInEditor>False</useInEditor>
      <refreshRate>0</refreshRate>
      <properties />
    </macro>
  </Macros>

  <DictionaryItems />
  <Languages />

  <DataTypes />

  <files/>
  
  <Actions>
   
    <Action runat="install" alias="addXsltExtension" assembly="\bin\UComment" type="UComment.XSLTLibrary" extensionAlias="UCommentLibrary" />

    <Action runat="install" alias="ucomment_addRestExtension">
      <ext assembly="/bin/UComment" type="UComment.Library.Base" alias="UComment">
        <permission method="CreateComment" returnXml="false" allowAll="true" />
        <permission method="GetGravatarImage" returnXml="false" allowAll="true" />
      </ext>
    </Action>

    <Action runat="install" alias="addDashboardSection" dashboardAlias="Comments">
      <section>
        <areas>
          <area>content</area>
        </areas>
       
        <tab caption="Comments">
          <control>/usercontrols/UComment/UCommentModeration.ascx</control>
        </tab>

      </section>
    </Action>

    <Action runat="install" alias="ucomment_executeNonQuery">
      <Sqlserver>
        <![CDATA[      	
      	CREATE TABLE [Comment](
		      [id] [int] IDENTITY(1,1) NOT NULL,
		      [mainid] [int] NOT NULL,
		      [nodeid] [int] NOT NULL,
		      [name] [nvarchar](250) NULL,
		      [email] [nvarchar](250) NULL,
		      [website] [nvarchar](250) NULL,
		      [comment] [ntext] NULL,
		      [spam] [bit] NULL,
		      [ham] [bit] NULL,
		      [created] [datetime] NULL
	       CONSTRAINT [PK_Comment] PRIMARY KEY CLUSTERED 
	      (
		      [id] ASC
	      ));
	      ]]>
      </Sqlserver>
      <VistaDB>
        <![CDATA[
          CREATE TABLE [Comment]
          (
          [id] INT NOT NULL PRIMARY KEY,
          [mainid] INT NOT NULL,
          [nodeid] INT NOT NULL,
          [name] NVARCHAR (250),
          [email] NVARCHAR (250),
          [website] NVARCHAR (250),
          [comment] NTEXT,
          [spam] BIT,
          [ham] BIT,
          [created] DATETIME
          );

          ALTER TABLE [Comment]
          ALTER COLUMN [id] INT NOT NULL IDENTITY (1, 1);
          ]]>
      </VistaDB>
      <MySQL>
        <![CDATA[
          CREATE TABLE Comment (
          id INTEGER UNSIGNED DEFAULT NULL AUTO_INCREMENT,
          mainid INTEGER UNSIGNED NOT NULL,
          nodeid INTEGER UNSIGNED NOT NULL,
          name VARCHAR(250),
          email VARCHAR(250),
          website VARCHAR(250),
          comment TEXT,
          spam BOOLEAN,
          ham BOOLEAN,
          created DATETIME,
          PRIMARY KEY (id)
          );
          ]]>
      </MySQL>
    </Action>

  </Actions>

  <control />
  
</umbPackage>